.pip-learning-assistant {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.status-message {
  margin: 10px 0;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s ease;
}

.video-container {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-video {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #000;
}

.button-group {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background-color: #f0f0f0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

button:hover:not(:disabled) {
  background-color: #e6f7ff;
  border-color: #1890ff;
  color: #1890ff;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border-top: 4px solid #4caf50;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-container {
  width: 80%;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  margin: 10px auto;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #4caf50;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  line-height: 20px;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  font-weight: bold;
}

.current-task {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #1890ff;
}

.task-card {
  background-color: #fff;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.task-header h4 {
  margin: 0;
  color: #333;
}

.task-countdown {
  background-color: #f0f0f0;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 14px;
  color: #666;
  font-weight: bold;
}

.task-body p {
  margin-top: 0;
  color: #555;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.quiz-option {
  text-align: left;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.quiz-option:hover {
  background-color: #e6f7ff;
  border-color: #1890ff;
}

.task-history {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  padding: 10px;
  margin-bottom: 8px;
  background-color: #fff;
  border-radius: 4px;
  border-left: 3px solid #ccc;
}

.history-task-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.history-task-description {
  color: #666;
  font-size: 14px;
}

.instructions {
  margin-top: 30px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.instructions ul {
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 8px;
}


/* 画中画内容叠加样式 */
.pip-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.pip-task {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  max-width: 80%;
}

.pip-task-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.pip-countdown {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  display: inline-block;
  margin-top: 5px;
}

/* 适配移动设备 */
@media (max-width: 768px) {
  .video-container {
    margin: 15px 0;
  }
  
  .button-group {
    flex-direction: column;
    align-items: center;
  }
  
  button {
    width: 100%;
  }
}
